/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aviso.entity;

/**
 *
 * @author avgusti
 */
public class MarkerListWraper<E> {

    private E item;

    public MarkerListWraper(E item) {
        this.item = item;
    }

    public E getItem() {
        return item;
    }

    public void setItem(E item) {
        this.item = item;
    }
    private int priority=0, number;

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }
    public static final int HIGH = 0;
    public static final int NORMAL = 1;
    public static final int LOW = 2;
    public static final String Icon_Prefix[] = {"red", "green", "black"};
    public static String ext=".png";
    
    public static String printIconName(MarkerListWraper m)
    {
        String tmp= Icon_Prefix[m.priority]+"/"+Icon_Prefix[m.priority]+m.number;
//        if(m.getItem() instanceof Advert ){
//        tmp+=getIconByAdvType(((Advert)m.getItem()).getType());
//        }
        return tmp+ext;
    }
    
    public static String getIconByAdvType(AdvType type) {
        switch (type) {
            case APPARTMENT:
                return "apt";
            case BUILDING:
                return "bld";
            case LAND:
                return "lnd";
            default:
                return "apt";
        }
    }
}
